import request from '@/utils/request'
import url from './url'

// 获取销售指标卡数据
export function getSaleIndexCard(params) {
  return request({
    url: url.saleIndexCard,
    method: 'get',
    params
  })
}

// 销售趋势
export function getSaleTrend(params) {
  return request({
    url: url.saleTrend,
    method: 'get',
    params
  })
}
// 订单单价分析
export function getSaleOrderPrice(params) {
  return request({
    url: url.saleOrderPrice,
    method: 'get',
    params
  })
}
// 销售退货分析
export function getSaleReturn(params) {
  return request({
    url: url.saleReturn,
    method: 'get',
    params
  })
}

// 库龄分析
export function getStorageTime(params) {
  return request({
    url: url.storageTime,
    method: 'get',
    params
  })
}

// 库龄分析饼图
export function getStorageTimePie(params) {
  return request({
    url: url.storageTimePie,
    method: 'get',
    params
  })
}

// 获取指标卡商品数量和库存金额
export function getIndexGoodNumberAndMoney(params) {
  return request({
    url: url.indexGoodNumberAndMoney,
    method: 'get',
    params
  })
}

// 获取指标卡商品报损数量和库销比
export function getIndexGoodsLossAndSaleRate(params) {
  return request({
    url: url.indexGoodsLossAndSaleRate,
    method: 'get',
    params
  })
}

// 进货指标(顶端数据)buyKpi
export function getBuyKpi(params) {
  return request({
    url: url.buyKpi,
    method: 'get',
    params
  })
}

// 进货趋势
export function getBuyTrend(params) {
  return request({
    url: url.buyTrend,
    method: 'get',
    params
  })
}

// 进货订单单价比率
export function getBuyOrderPriceRate(params) {
  return request({
    url: url.buyOrderPriceRate,
    method: 'get',
    params
  })
}

